TEXTSCREEN-8-SPRITES -------------------------------------------------------------------------------------------------- TOOL: COMAL-80-C64 Language: COMAL - Structured BASIC Extra: - Author: Misel Zivanovic Note: (C) 9th March 2026 - www.lived.ch, mzretro.ch --------------------------------------------------------------------------------------------------- Let's continue with the sprites and TEXTSCREEN as environment! This is how easy it is to bring 8 {sprite} balls on the screen! Notice how we didn't used any SETPAGE command and sprite are accessible. Screenshot 1 is showing 8 sprites, text screen, a copies of the SPRITE 0! Screenshot 2 is showing SPRITE 0 on the high resolution screen and as you can see, it is not the same! It is not the same because we have no data inside of the region where the pointer is looking for it. Remember? $D000, SETPAGE 0 to access it. We will do that the next time. 0010 USE sprites 0020 USE graphics 0030 textbackground(0); textborder(0) 0040 textcolor(15) 0050 RESTORE mysprites 0060 FOR a:=0 TO 63 DO 0070 READ spritedata 0080 POKE 832+a,spritedata 0090 ENDFOR a 0100 POKE 53269,255 // all sprites on 0110 POKE 53248,24 // left up. corner 0120 POKE 53249,50 // sprite 0 0130 POKE 2040,13 0140 // comal sprite commands 0150 PAGE 0160 xp:=0 0170 FOR a:=0 TO 7 DO 0180 spritecolor(a,a+1) 0190 spritesize(a,1,1) 0200 ENDFOR a 0210 FOR a:=0 TO 7 DO 0220 IF a<4 THEN 0230 spritepos(a,xp,200/2-30) 0240 ENDIF 0250 IF a>3 THEN 0260 IF a=4 THEN xp:=0 0270 spritepos(a,xp,200/2+30) 0280 ENDIF 0290 xp:=xp+80 0300 ENDFOR a 0310 0320 // sprite data 0330 mysprites: 0340 DATA 1,255,128,6,255,224,31,255 0350 DATA 248,62,255,252,52,95,252 0360 DATA 126,255,254,127,255,254 0370 DATA 126,255,254,255,255,255 0380 DATA 255,255,255,255,255,255 0390 DATA 255,255,255,255,255,255 0400 DATA 255,255,255,127,255,254 0410 DATA 127,255,254,63,255,252 0420 DATA 63,255,252,31,255,248,7 0430 DATA 255,224,1,255,128,0 ---------------------------------------------------------------------------------------------------